#ifndef _IF_H_
#define _IF_H_
#include "python3/PythonGrammar30TreeConstants.h"
#include "ast/stmtType.h"
#include "ast/exprType.h"
#include "ast/stmtType.h"
#include "ast/suiteType.h"
#include "AstTypes.h"
class IVisitor;
class If;
typedef QSharedPointer<If> IfPtr;

class If: public stmtType
{
public:
    explicit If(const exprTypePtr& test, const StmtTypeList& body, const suiteTypePtr& orelse, int nodeId=JJTIF_STMT);
    virtual ~If();
    
    
    exprTypePtr test();
    void setTest(const exprTypePtr& test);
    
    StmtTypeList body();
    void setBody(const StmtTypeList& body);
    
    suiteTypePtr orelse();
    void setOrelse(const suiteTypePtr& orelse);
    
    
    virtual Ast::AstTypes type() const;
    virtual QString toString() const;
    virtual void accept(IVisitor* visitor, const SimpleNodePtr& node);
    virtual void traverse(IVisitor* visitor);
private:
    exprTypePtr _test;
    StmtTypeList _body;
    suiteTypePtr _orelse;
};




#endif